<?php
echo '<div id="contentfull">';
echo '<div id="forms">';
//print_r($roles);
//$name = $data[0]['Name'];
//$username = $data[0]['username'];
//echo validation_errors('<div class="error">', '</div>'); 
//$attributes = array('class' => 'frmedit', 'width' => '600px', 'margin' => '0 auto');
$hidden = array('Name' => $data['Name'], 'username' => $data['username'], 'regtypetype' => $data['regtypetype'], 'accepttandc' => $data['accepttandc'], 'acceptprivacy' => $data['acceptprivacy'] );
echo '<a href="'.$baseurl.'"><img class="btnimg" src="'.$baseurl.'public/images/close.png" align="right" alt="close" border="0" /></a>';

?>
         
<?php
       echo form_open($baseurl.'index.php/register','', $hidden);
       echo form_fieldset('<h3>   REGISTER (Final Step)   </h3>');
?>       
<table>
    <tr>  <!-- Name -->
        <td width="250px" colspan="3" >
<?php  echo $data['Name'].' of Email address : '.$data['username'].' Congratulations we just need to get through the last few items and then we can start adjudicating your membership to this site';
       echo '</td>'
?>

    <tr>  <!-- Mobile -->
        <td> <?php echo form_label('Mobile *', 'mobile'); $mobilec = array('name' => 'mobile', 
               'id' => 'mobile',  
               'maxlength'   => '10',
              'size'        => '10',
              'style'       => 'width: 150px' ); ?> </td>
        <td> <?php echo form_input($mobilec); echo '<br>'.form_error('mobile'); ?> </td>
        <td>Your mobile is for sending you alerts and validating information</td>
        
    </tr>
    <tr>   <!-- Areas -->
        <td> <?php echo form_label('Select an area', 'areas');  $level = array('name' => 'areas', 'id' => 'areas' );
        
        // This code allows for all areas to be displayed and the ones that are linked to be selected
        $options = [];
        $options = array_merge($options, array('0' => 'Select an area'));
        foreach($areas as $value)
        {
            $mid = $value['id'] ;
            $t = array($mid => $value['Area']);
            $options = array_merge($options, $t); 
        }

?> </td>
        <td> <?php echo form_dropdown('areas', $options); echo '<br>'.form_error('areas'); ?> </td>
        <td> select the area that you would like to join, if your area is not shown please use the contact form to contact the site administrator to request a new are be added. If you are not a resident do not select an area </td>
    </tr>
   
    <tr>  <!-- Addresss -->
        <td> <?php echo form_label('Address *', 'address'); 
            $addressc = array('name' => 'address', 
            'id' => 'address',  
            'maxlength'   => '200',
            'style'       => 'width: 200px' ); ?> </td> 
        <td> <?php echo form_textarea($addressc); echo '<br>'.form_error('address'); ?> </td>
        <td>Please enter your address that is in the area you have selected, or in the case of an advertise or service provider your address </td>
        
    </tr>
    
     
    <tr>   <!-- Motivation -->
        <td> <?php echo form_label('Motivation *', 'motivation'); 
            $motivationc = array('name' => 'motivation', 
            'id' => 'motivation',  
            'maxlength'   => '200',
            'style'       => 'width: 200px' ); ?> </td> 
        <td> <?php echo form_textarea($motivationc); echo '<br>'.form_error('motivation'); ?> </td>
        <td>Any other information that you think may be relevant to your request</td>
        
    </tr>
    <tr>
        
        <!-- This is the Buttons -->
         <td colspan="3" align="right" > <?php echo form_submit('save', 'Register'); echo form_reset('reset', 'Reset');?>  
    </tr>
</table>    
<?=form_fieldset_close()?>
<?=form_close();?>

</div> <!--content-->
</div> <!--login-->
